package two;
import java.util.*;

class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
}

public class A035 {

    //前序遍历
    List<Integer> list = new ArrayList<>();

    public List<Integer> inorderTraversal(TreeNode root) {
        if(root==null) return list;
        inorderTraversal(root.left);
        list.add(root.val);
        inorderTraversal(root.right);
        return list;
    }


}




